import React from "react";


import { HashRouter, Route, Routes, Link } from 'react-router-dom';
import Product from './views/Product';
import Product2 from './views/Product2';

 
const App = () => {

  return (
    <div>
        <HashRouter >
            <div>
            <nav>
                <ul>
                <li><Link to="/product?id=123">查看产品 123</Link></li>
                <li><Link to="/product2/456">查看产品 456</Link></li>
                </ul>
            </nav>

            <Routes>
                <Route path="/product" element={<Product />} />
                <Route path="/product2/:id" element={<Product2 />} />

            </Routes>
            </div>
        </HashRouter>
    </div>
  );
}
 
export default App;